package com.info.repository;

import com.info.domain.Info;
import com.repository.ReadOnlyPagingAndSortingRepository;
import org.springframework.data.repository.query.QueryByExampleExecutor;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

import java.util.List;

/**
 * Created by sola on 2017/9/23.
 */
@RepositoryRestResource(collectionResourceRel = "info", path = "info")
public interface InfoRepository extends ReadOnlyPagingAndSortingRepository<Info, String>, QueryByExampleExecutor<Info> {

    Info findInfoByUserName(String name);

    Info findInfoByUserNameAndVersion(String name,Long Version);

    List<Info> findInfoByVersion(Long Version);

    List<Info> findInfosByUserName(String name);

    List<Info> findInfosByUserNameLike(String name);

}
